package cn.edu.zafu.bigdata.lwg;

// 定义父类 Animal
class Animal {
    public void makeSound() {
        System.out.println("Animal sound");
    }
}

// 定义子类 Dog，继承自 Animal
class Dog extends Animal {
    public void makeSound() {
        System.out.println("Woof!");
    }
}

// 定义子类 Cat，继承自 Animal
class Cat extends Animal {
    public void makeSound() {
        System.out.println("Meow!");
    }
}

// 测试类
public class Test1 {
    public static void main(String[] args) {
        Dog dog = new Dog();
        Cat cat = new Cat();

        dog.makeSound();
        cat.makeSound();
    }
}

